const { VantResolver } = require('@vant/auto-import-resolver');
const ComponentsPlugin = require('unplugin-vue-components/webpack');

module.exports = {
    productionSourceMap:true,
    lintOnSave: false,
    configureWebpack: {
        plugins: [
            ComponentsPlugin.default({ resolvers: [VantResolver()] }), //当 unplugin-vue-components 版本大于等于 0.26.0
        ],
    },
    devServer: {
        proxy: {
            '/api': {
                target: 'https://demo.oskylive.com/osgh/card',
                changeOrigin: true,
                pathRewrite: { '^/api': '' }
            }
        }
    }
};
